From 06a137142048ec5237568e60df7af30107c88ad5 Mon Sep 17 00:00:00 2001 From: "Herman J. Radtke III" Date: Sat, 6 May 2017 23:33:45 -0700 Subject: [PATCH] Add test with workspace path that has no Cargo.toml --- tests/workspaces.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/workspaces.rs b/tests/workspaces.rs index a47c6074a..4a1f3bb63 100644 --- a/tests/workspaces.rs +++ b/tests/workspaces.rs @@ -1442,3 +1442,27 @@ fn glob_syntax() { assert_that(&p.root().join("crates/baz/Cargo.lock"), is_not(existing_file())); assert_that(&p.root().join("crates/qux/Cargo.lock"), existing_file()); } + +#[test] +fn glob_syntax_non_cargo_folder() { + let p = project("foo") + .file("Cargo.toml", r#" + [project] + name = "foo" + version = "0.1.0" + authors = [] + + [workspace] + members = ["crates/*"] + "#) + .file("src/main.rs", "fn main() {}") + .file("crates/bar/src/main.rs", "fn main() {}"); + p.build(); + + assert_that(p.cargo("build"), execs().with_status(0)); + assert_that(&p.bin("foo"), existing_file()); + assert_that(&p.bin("bar"), is_not(existing_file())); + + assert_that(&p.root().join("Cargo.lock"), existing_file()); +} + -- 2.30.2